<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/vectrics.tld"    prefix="vectrics" %>



<%@ page import="org.vectrics.hibernate.ThreadProperties" %>
<%@ page import="org.vectrics.domain.Domain" %>

<%
	String domainId = ThreadProperties.getUriDomainId();
	Domain domain = ThreadProperties.getDomain();
	String formAction = "/profile/" + domainId + "/savepassword";

%>
<jsp:useBean id="userPasswordForm" class="org.vectrics.user.web.struts.UserPasswordForm" scope="request"/>

<table width="100%">
	<tr>
		<td valign="middle" >
			<html:form action="<%=formAction%>" focus="oldPassword" method="POST">
				<html:hidden property="personId"/>
				<table width="100%">
					<tr>
						<td valign="middle"  width="50%">
							<table width="100%">
								<tr>
									<td valign="top"  width="50%">
										<font class="formLabelClass">User</font>
									</td>
									<td valign="top" >
										<html:text styleClass="formStaticClass" property="userName" readonly="true"/>
									</td>
								</tr>
								<tr>
									<td valign="top">
										<font class="formLabelClass"><bean:message key="prompt.password.old"/><b> *</b></font>
										<vectrics:errors property="oldPassword"/>
									</td>
									<td valign="top">
										<html:password property="oldPassword" styleClass="formEditClass" maxlength="16"/>
									</td>
									<td></td>
								</tr>
								<tr>
									<td valign="top">
										<font class="formLabelClass"><bean:message key="prompt.password"/><b> *</b></font>
										<vectrics:errors property="password"/>
									</td>
									<td valign="top">
										<html:password property="password" styleClass="formEditClass" maxlength="16"/>
									</td>
									<td></td>
								</tr>
								<tr>
									<td valign="top">
										<font class="formLabelClass"><bean:message key="prompt.confirm.password"/><b> *</b></font>
										<vectrics:errors property="password2"/>
									</td>
									<td valign="top">
										<html:password property="password2" styleClass="formEditClass" maxlength="16"/>
									</td>
									<td></td>
								</tr>
								
								<tr>
									<td valign="top" colspan="3">
										<table>
											<tr>
												<td valign="top"  align="left"></td>
												<td valign="top"  align="left">
													<vectrics:formButton name="submit" code="public.button.ok" phraseCode="button.ok"/>
													&nbsp;
													<vectrics:formButton name="cancel" code="public.button.cancel" phraseCode="button.cancel"/>
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</html:form>
		</td>
	</tr>
</table>
